{extend name='admin@public/content'}

{block name="button"}
<!--{if auth("$classuri/add")}-->
<button data-modal='{:url("$classuri/add")}' data-title="新增项目" class='layui-btn layui-btn-sm layui-btn-primary'>新增项目</button>
<!--{/if}-->
{/block}

{block name="content"}
<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">选择日期</label>
        <div class="layui-input-inline">
            <input name="date" id="stats_date" value="{$Think.get.date}" placeholder="请输入分类名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>

</form>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="true" method="post">
    <!--{if empty($list)}-->
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    <!--{else}-->
    <input type="hidden" value="resort" name="action">
    <table class="layui-table notevent" lay-skin="line">
        <thead>
        <tr>
            <th class='list-table-check-td'>
                <input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
            </th>
            <th class='list-table-sort-td w60'>ID</th>
            <th>日期</th>
            <th class="w150">订单数</th>
            <th class="w150">用户数</th>
            <th class="w150">体检中心</th>
            <th class="w150">体检套餐</th>
            <th class="w120">总价</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td'>
                <input class="list-check-box" value='{$vo.id}' type='checkbox'/>
            </td>
            <td class='list-table-sort-td'>{$vo.id}</td>
            <td>{$vo.create_time|date="Y-m-d"}</td>
            <td>{$vo.num_order}</td>
            <td>{$vo.num_user}</td>
            <td>{$vo.num_mec}</td>
            <td>{$vo.num_set}</td>
            <td>{$vo.total_price|number_format}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($page)}<p>{$page|raw}</p>{/if}
    <!--{/if}-->
</form>
<script>
    (function () {
        window.form.render();
        window.laydate.render({range: true, elem: '#create_at'});
    })();

    $(function () {
        date = new Date();
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#stats_date',
            });
        });
    });
</script>
{/block}